layui.use(['jquery', 'element', 'layer'], function () {
    var $ = jq = layui.jquery,
        element = layui.element,
        layer = layui.layer;

    $('span.layui-breadcrumb,span.card-type').on('click', 'a', function () {
        change_label($(this));
    });

    function change_label($this) {
        var cho_class = $this.data('class');
        $('span.layui-breadcrumb').find('.yw-this').removeClass('yw-this');
        $('span.layui-breadcrumb').find('[data-class="' + cho_class + '"]').addClass('yw-this');
        $('.yw-item').css('display', 'none');
        if (cho_class) {
            $('.yw-item.type_' + cho_class).css('display', 'block');
        } else {
            $('.yw-item').css('display', 'block');
        }
    }
});